import 'package:flutter/material.dart';

class InputFilletWidget extends StatelessWidget {
  final String hintText;
  final String preText;
  final TextEditingController contro;
  final EdgeInsets margin;
  final bool enabled;

  Border border;

  InputFilletWidget(
      {this.hintText,
      this.contro,
      this.margin,
      this.border,
      this.preText,
      this.enabled});

  @override
  Widget build(BuildContext context) {
    if (border == null) {
      border = Border.all(color: Color(0xffefefef), width: 0.5); // 边色与边宽度
    }
    // TODO: implement build
    return Container(
      width: double.infinity,
      padding: EdgeInsets.only(left: 10, right: 16),
      decoration: BoxDecoration(
        color: Colors.white, // 底色
        border: border,
        borderRadius: new BorderRadius.circular((5.0)), // 圆角度
      ),
      child: TextField(
          controller: contro,
          enabled: enabled,
          decoration: InputDecoration(
              hintText: hintText,
              hintStyle: TextStyle(fontSize: 16),
              border: InputBorder.none,
              contentPadding: EdgeInsets.only(top: 15, bottom: 15))),
    );
  }
}
